﻿@*@model BulletinModel.Feedback
*@
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Scripts/jquery.raty.js")" type="text/javascript"></script>

<script type="text/javascript">
            function InitRaty(selfRaty) {
                var RatyReadOnly = true;
                if (selfRaty == 0) {
                    RatyReadOnly = false;
                }
            }

    function ClickRaty(selfRaty) {
        $.fn.raty.readOnly(true);//用这个方法设置评分插件为只读
        //同上面的$.fn.raty.readOnly(true)，源代码中是一样的
        //$('img.' + $this.attr('id')).die();
        //$this.css('cursor', 'default').die();
    }


    $(function () {
        $('#commentstar').raty(
            {
                hints: ['1', '2', '3', '4', '5'],
                path: "../../Content/StarImg",
                starOff: 'star-off-big.png',
                starOn: 'star-on-big.png',
                size:24,
                targetKeep: true,
                target: '#starbiaoji',

               click: function (score, evt) {
                     
                   $('#tijiao').attr('disabled', false);
                 //  SaveRaty(score); //$this.attr('id')得到加载评分插件的div的id是div_jQueryRaty
                   //单击后设置此评分控件不再可用
                   }
            }
            );
    })
   $(document).ready((function ()
   {
       $("#nonejsstar").hide();//设置不支持js的模块隐藏
        if ($('#textid').text().toString().trim() == "" && $('#starbiaoji').text().toString().trim()=="")
        $('#tijiao').attr('disabled', true);
    else{
           $('#tijiao').attr('disabled', false);     
        }
      // $('#tijiao').focus
       $('#textid').bind("focus", function () {
           // if ($(this).text().toString().trim()!="")
                $('#tijiao').attr('disabled', false);
            });

    }))
   </script>

<div style="display:@ViewData["ButtonVisible"]">

@using (Html.BeginForm("MakeCommentSavedata","Feedback"))
{
    @Html.ValidationSummary(true)
    <fieldset class="newBtn">
        <legend>评价</legend>
@*        <div class="editor-field">*@
           <div id="commentstar"   style="display:@ViewData["StarVisible"]"></div>             
            <div  id="nonejsstar"  style="display:@ViewData["StarVisible"]">
               <table style="border:0px">
                   <tr style="border:0px">
                   <td style="border:0px"> 
             @Html.RadioButton("noneStarValue","1") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("noneStarValue","2") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("noneStarValue","3") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("noneStarValue","4") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("noneStarValue","5") <img src="../../Content/StarImg/star-on-big.png" />
                    </td>
                      </tr>
               </table>
           </div>                                       
@*        </div>*@
        <div style="display:@ViewData["TextVisible"]">
            @Html.TextArea("TextValue", new { @id="textid"})
        </div>
         @Html.Hidden("StarValue",null ,new{@id="starbiaoji"})
         @Html.Hidden("projectSN",ViewData["projectSN"])
         @Html.Hidden("BulletinYaMa",ViewData["BulletinYaMa"] )        
         @Html.Hidden("YeMa", ViewData["YeMa"])
        <div class="editor-btn">
            <input type="submit" id="tijiao"   value="提交"  />
        </div>
    </fieldset>
}
</div>


@*<div id="nonejsstar" style="display:@ViewData["ButtonVisible"]">
@using (Html.BeginForm("NonejsMakeCommentSavedata", "Feedback"))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>评价</legend>
           <div   style="display:@ViewData["StarVisible"]">
               <table style="border:0px">
                   <tr style="border:0px">
                   <td style="border:0px"> 
             @Html.RadioButton("StarValue","1") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("StarValue","2") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("StarValue","3") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("StarValue","4") <img src="../../Content/StarImg/star-on-big.png" />
            @Html.RadioButton("StarValue","5") <img src="../../Content/StarImg/star-on-big.png" />
                    </td>
                      </tr>
               </table>
           </div>         
        <div class="editor-field" style="display:@ViewData["TextVisible"]">
            @Html.TextArea("TextValue", new { @id="textid"})
        </div>
         @Html.Hidden("projectSN",ViewData["projectSN"])
         @Html.Hidden("BulletinYaMa",  ViewData["BulletinYaMa"] )        
         @Html.Hidden("YeMa", ViewData["YeMa"])
        <p>
            <input type="submit"  value="提交"  />
        </p>
    </fieldset>
}
    </div>*@
